from pydantic_settings import BaseSettings


class Settings(BaseSettings):
    # OpenAI配置
    openai_api_key: str = "7768403e-1595-4b65-a57e-0d26f376cb8d"
    openai_base_url: str = "https://ark.cn-beijing.volces.com/api/v3"
    openai_model: str = "doubao-seed-1-6-250615"
    
    # 服务配置
    server_host: str = "0.0.0.0"
    server_port: int = 8085
    grpc_port: int = 50051
    
    # Consul配置
    consul_host: str = "192.168.17.135"
    consul_port: int = 8500
    service_name: str = "title-service"
    service_id: str = "title-service-1"
    health_check_interval: str = "10s"
    
    # 标题生成配置
    default_title_count: int = 3
    max_title_count: int = 10
    max_content_length: int = 5000
    
    # 日志配置
    log_level: str = "INFO"
    log_file: str = "logs/title_service.log"
    
    class Config:
        env_file = ".env"
        env_file_encoding = "utf-8"